<ion-view view-title="联系人列表">
  <ion-nav-buttons side="left">
    <button class="button button-clear ion-ios7-arrow-thin-left button-positive" ng-click="goBack()">
      <div class="icon ion-ios-arrow-back"></div>
    </button>
  </ion-nav-buttons>
  <ion-nav-buttons side="right">
    <button class="button button-clear button-positive" ng-click="openModal()">
      部门
    </button>
  </ion-nav-buttons>
  <div class="bar bar-header item-input-inset bar-subheader" no-scroll="true">
    <label class="item-input-wrapper">
      <i class="icon ion-ios-search placeholder-icon"></i>
      <input type="search" placeholder="搜索" ng-model="keyword">
    </label>
  </div>
  <ion-content class="has-header has-subheader has-footer" scroll="true">
    <ion-list>
      <ion-item class="item-remove-animate normal-list-height item-height"
                collection-repeat="customer in show | groupfilter:groupkeyword | filter:keyword">
        <ion-checkbox ng-checked="checked(customer.userCode)" ng-model="statue" ng-click="changStatue(customer,statue)"
                      class="contact-item">
          <div>
            <label class="size16">{{customer.empname}}</label>
            <label></label>
          </div>
          <p></p>
        </ion-checkbox>
      </ion-item>
    </ion-list>
  </ion-content>
  <ion-footer-bar class="stable-bg">
    <button class="button button-clear button-positive" style="width: 100%;" ng-click="updatePerShare()">
      确定
    </button>
  </ion-footer-bar>
</ion-view>
<script id="my-modal.html" type="text/ng-template">
  <ion-modal-view>
    <div class="modal">
      <ion-header-bar class="bar-stable">
        <h1 class="title">部门</h1>
        <button class="button button-clear button-positive" ng-click="closeModal()">
          确定
        </button>
      </ion-header-bar>
      <div class="bar bar-header item-input-inset bar-subheader" no-scroll="true">
        <label class="item-input-wrapper">
          <i class="icon ion-ios-search placeholder-icon"></i>
          <input type="search" placeholder="搜索" ng-model="keywordDep">
        </label>
      </div>
      <ion-content class="has-header has-subheader" scroll="true">
        <ion-list>
          <ion-item class="item-remove-animate normal-list-height item-height">
            <ion-checkbox ng-model="statue" ng-click="selectAllDep(statue)" class="contact-item depart">
              <div>
                <label class="size16">选择所有部门</label>
                <label></label>
              </div>
              <p></p>
            </ion-checkbox>
          </ion-item>
          <ion-item class="item-remove-animate normal-list-height item-height"
                    collection-repeat="Dep in Dep | filter:keywordDep">
            <ion-checkbox ng-checked="checkedDep(Dep.orgid)" ng-model="statue" ng-click="selectDep(Dep.orgid,statue)"
                          class="contact-item depart">
              <div>
                <label class="size16">{{Dep.orgname}}</label>
                <label></label>
              </div>
              <p></p>
            </ion-checkbox>
          </ion-item>
        </ion-list>
      </ion-content>
    </div>
  </ion-modal-view>
</script>
